package com.test;

import java.util.ArrayList;

public class AllSort{
   /* public static void main(String[] args) {
        char buf[]={'1','2','3','4','5'};
  
        perm(buf,0,buf.length-1);    
    }  */
    public static void perm(char[] buf,int start,int end){    
        if(start==end){//当只要求对数组中一个字母进行全排列时，只要就按该数组输出即可    
            for(int i=0;i<=end;i++){    
                System.out.print(buf[i]);    
            }    
            System.out.println();       
        }    
        else{//多个字母全排列    
            for(int i=start;i<=end;i++){    
                char temp=buf[start];//交换数组第一个元素与后续的元素
                buf[start]=buf[i];    
                buf[i]=temp;    
                    
                perm(buf,start+1,end);//后续元素递归全排列    
                    
                temp=buf[start];//将交换后的数组还原
                buf[start]=buf[i];    
                buf[i]=temp;    
            }    
        }

    }

    public static void main(String[] args) {
   /*     String data = "\uD835\uDD46 is a circle";
        System.out.println(data.length());
        System.out.println(data.codePointCount(0, data.length()));//代码点长度
        System.out.println(data.charAt(0));//两个char保存一个导致取不到
        //index 与第0个代码点的距离   codePointOffset 与第0个代码单元的距离   返回值为从0开始偏移7个代码单元的索引值
        //codePointAt获取ASCII码值
        int i = data.offsetByCodePoints(5, 7);
        System.out.println(i);
        System.out.println(data.codePointAt(i));
*/
        ArrayList arrayList = new ArrayList(3);

        for(int a=0;a<6;a++) {
            arrayList.add(1);
        }
        System.out.println(arrayList.size());
        arrayList.get(1);
        arrayList.remove(new String());
        arrayList.remove(1);
    }
}  
